package com.example.demo.day.config.learn.designBook.part7single.part1;

//皇帝类
public class Emperor {

    //初始化一个皇帝
    private static final Emperor emperor = new Emperor();

    private Emperor() {

    }

    public static Emperor getInstance() {
        return emperor;
    }

    //皇帝发话了
    public static void say() {
        System.out.println("我是皇帝xxx....");
    }
}
